﻿using System;
using System.Collections;
using System.Web.UI;

namespace Pap.Web.Modules.Loan.Views
{
    /// <summary>
    /// 
    /// </summary>
    public partial class PrintBoardMom : System.Web.UI.Page
    {

        /// <summary>
        /// Gets the board mom members print.
        /// </summary>
        private IEnumerable boardMomMembersPrint
        {
            get { return Session["boardMomMembersPrint"] as IEnumerable; }
        }

        /// <summary>
        /// Gets the board momloans print.
        /// </summary>
        private IEnumerable boardMomloansPrint
        {
            get { return Session["boardMomloansPrint"] as IEnumerable; }
        }

        /// <summary>
        /// Gets the board number.
        /// </summary>
        public string boardNumber
        {
            get
            {
                return Request.QueryString["BoardNumber"];
            }
        }
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (!boardNumber.IsNullOrEmpty())
                {
                    txtBoardNumber.Text = boardNumber;
                    txtHeaderBoardNumber.Text = boardNumber;
                }
                if (boardMomMembersPrint != null)
                {
                    grvBoardMomUsers.DataSource = boardMomMembersPrint;
                    grvBoardMomUsers.DataBind();

                }
                if (boardMomloansPrint != null)
                {
                    grvBoardMomLoans.DataSource = boardMomloansPrint;
                    grvBoardMomLoans.DataBind();
                }
            }
        }
    }
}
